//
// Created by liushuai on 12/21/19.
//
double mypow(double x,int n){
    if(n<0)
        return 1/mypow(x,-n);
    if(n == 0)
        return 1;
    double half = mypow(x,n/2);
    if(n%2 == 0)
        return half*half;
    else
        return half*half*x;
}
